import {Points} from './points.js'

export class Rain {
    constructor(scene) {
        this.points = new Points(scene,{
            size:10,
            opacity:0.4,
            range:1000,
            count:800,
            setAnimation(position){
                position.y -= position.speedY
                if (position.y <= 0) {
                    position.y = this.range / 2
                }
            },
            setPosition(position){
                position.speedY = 1
            },
            url:'../../src/assets/rain.png',
        })
    }
    animation() {
        this.points.animation()
    }
}